package com.kriss.blog.common;

import java.util.List;



public class BaseServiceImpl<T> implements IBaseService<T> {

	
	private IBaseDao  dao ;
	
	public boolean save(T t) {
		boolean  result = true;
		try {
			dao.save(t);
		} catch (Exception e) {
			result = false;
			e.printStackTrace();
		}
		return result;
	}
	
	public IBaseDao getDao() {
		return dao;
	}
	public void setDao(IBaseDao dao) {
		this.dao = dao;
	}

	public List<T> findByHql(String hql, Object... value) {
		return dao.findByHql(hql, value);
	}
	
	
	

}
